package net.paoding.rose.jade.statement.jexl.analysis.impl;


import net.paoding.rose.jade.statement.jexl.Jexl3Execute;
import net.paoding.rose.jade.statement.jexl.analysis.Analysis;

/**
 * join # ! 拼接字符串解析
 * @author fusheng.zhang
 * @date 2022-03-07 10:44:12
 */
public class JoinAnalysis implements Analysis {

    private String joinExp;

    @Override
    public String toString() {
        return joinExp;
    }

    @Override
    public void execute(Jexl3Execute jexl3Execute) {
        Object execute = jexl3Execute.execute(jexl3Execute.getParams(), jexl3Execute.getConstantParams(), toStr(joinExp));
        jexl3Execute.setStr(String.valueOf(execute));
    }

    public String getJoinExp() {
        return joinExp;
    }

    public JoinAnalysis setJoinExp(String joinExp) {
        this.joinExp = joinExp;
        return this;
    }
}
